package com.nageoffer.shortlink.common.convention.enums;

import com.nageoffer.shortlink.common.convention.errorcode.IErrorCode;

public enum UserErrorCodeEnum implements IErrorCode {
    USER_NULL("A000200","用户记录不存在"),
    USER_NAME_EXIST("A000201","用户名已存在"),
    USER_SAVE_ERROR("A000202","用户记录新增失败"),
    USER_MODIFY_ERROR("A000203","用户记录修改失败"),
    USER_LOGIN_ERROR("A000204","用户名或密码有误"),
    USER_LOGIN_EXIST("A000205","用户名已登录"),
    USER_UPDATE_OTHERS("A000206","非授权修改他人信息"),
    USER_TOKEN_FAIL("A000207","用户登录token校验失败");
    private final String code;

    private final String message;

    UserErrorCodeEnum(String code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public String code() {
        return code;
    }

    @Override
    public String message() {
        return message;
    }
}
